]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Don't create useless childBox
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 25 Feb 2021 11:06:25 +0000 (12:06 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 9 Mar 2021 15:40:49 +0000 (15:40 +0000)
Creating a ClutterActorBox here is superfluous, we actually create and
assign a new box to this variable inside the loop.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1743>

js/ui/workspace.js

index e78630df498a7ac54457d1a8fcc853291552594e..8a273e865ec737214e645ea3f24660308791c53d 100644 (file)
@@ -613,7 +613,6 @@ var WorkspaceLayout = GObject.registerClass({
 
         const workspaceBox = new Clutter.ActorBox();
         const layoutBox = new Clutter.ActorBox();
-        let childBox = new Clutter.ActorBox();
 
         const { ControlsState } = OverviewControls;
         const inSessionTransition =
@@ -657,7 +656,7 @@ var WorkspaceLayout = GObject.registerClass({
             layoutBox.set_origin(x, y);
             layoutBox.set_size(width, height);
 
-            childBox = workspaceBox.interpolate(layoutBox,
+            const childBox = workspaceBox.interpolate(layoutBox,
                 this._stateAdjustment.value);
 
             if (windowInfo.currentTransition) {